package stringTest;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: tao
 * Date: 2023-11-21
 * Time: 9:57
 */
public class Test6 {
    public static void main(String[] args) {
        String str = "hello world";
        System.out.println(str.replaceAll("l", "-"));
        System.out.println(str.replaceFirst("l", "-"));
    }
}
